package com.fulihui.usercore.api;

import org.near.servicesupport.request.TRequest;
import org.near.servicesupport.result.BaseResult;
import org.near.servicesupport.result.TMultiResult;
import org.near.servicesupport.result.TSingleResult;

import com.fulihui.usercore.condition.ThirdMerchantCondition;
import com.fulihui.usercore.dto.ThirdMerchantDTO;
import com.fulihui.usercore.request.merchant.ThirdMerchantSaveRequest;

/**
 * 分表分库 无需修改
 * 第三方商户服务
 * @author Willard.Hu on 2016/9/22 0022.
 */
public interface ThirdMerchantService {
    /**
     * 保存第三方商户
     * @param request {@link ThirdMerchantSaveRequest}
     * @return 返回基础结果 {@link BaseResult}
     */
    TSingleResult<Integer> save(ThirdMerchantSaveRequest request);

    /**
     * 删除第三方商户
     * @param request 主键
     * @return 返回基础结果 {@link BaseResult}
     */
    BaseResult delete(TRequest<Integer> request);

    /**
     * 主键查询第三方商户
     * @param request 主键
     * @return {@link ThirdMerchantDTO}
     */
    TSingleResult<ThirdMerchantDTO> queryByPK(TRequest<Integer> request);

    /**
     * 查询全部第三方商户
     * @param request 基础请求对象
     * @return 第三方商户列表 {@link ThirdMerchantDTO}
     */
    TMultiResult<ThirdMerchantDTO> query(TRequest<ThirdMerchantCondition> request);

}
